$OpenBSD: patch-src_current_makefile,v 1.2 2014/11/22 12:21:43 sthen Exp $
--- src/current/makefile.orig	Mon Aug 11 20:39:14 2014
+++ src/current/makefile	Sat Nov 22 12:11:25 2014
@@ -525,7 +525,7 @@ openbsd:	iozone_openbsd.o libbif.o fileop_openbsd.o pi
 #
 
 openbsd-threads:	iozone_openbsd-threads.o libbif.o
-	$(CC) -O $(LDFLAGS) -pthread iozone_openbsd-threads.o \
+	$(CC) $(CFLAGS) $(LDFLAGS) -pthread iozone_openbsd-threads.o \
 		libbif.o -o iozone
 
 #
@@ -1382,10 +1382,10 @@ iozone_openbsd-threads.o:	iozone.c libbif.c
 	@echo ""
 	@echo "Build iozone for OpenBSD with threads"
 	@echo ""
-	$(CC) -c -O -pthread -Dunix -Dbsd4_4 -DHAVE_ANSIC_C \
+	$(CC) -c $(CFLAGS) -pthread -Dunix -Dbsd4_4 -DHAVE_ANSIC_C \
 		-DNAME='"openbsd-threads"' $(CFLAGS) iozone.c \
 		-o iozone_openbsd-threads.o
-	$(CC) -c -O -pthread -Dunix -Dbsd4_4 -DHAVE_ANSIC_C \
+	$(CC) -c $(CFLAGS) -pthread -Dunix -Dbsd4_4 -DHAVE_ANSIC_C \
 		$(CFLAGS) libbif.c -o libbif.o
 
 iozone_OSFV3.o:	iozone.c libbif.c
